package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbAidgoodsku entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_AIDGOODSKU", schema = "dbo", catalog = "AGDB")
public class TbAidgoodsku implements java.io.Serializable {

	// Fields

	private String aidId;
	private TbType tbType;
	private String aidName;
	private String aidUnit;
	private String aidScale;
	private String aidLocation;
	private String aidLat;
	private String aidLng;
	private String a;
	private String b;
	private String c;
	private Set<TbAidgoogs> tbAidgoogses = new HashSet<TbAidgoogs>(0);

	// Constructors

	/** default constructor */
	public TbAidgoodsku() {
	}

	/** minimal constructor */
	public TbAidgoodsku(String aidId, TbType tbType, String aidName,
			String aidUnit, String aidLocation) {
		this.aidId = aidId;
		this.tbType = tbType;
		this.aidName = aidName;
		this.aidUnit = aidUnit;
		this.aidLocation = aidLocation;
	}

	/** full constructor */
	public TbAidgoodsku(String aidId, TbType tbType, String aidName,
			String aidUnit, String aidScale, String aidLocation, String aidLat,
			String aidLng, String a, String b, String c,
			Set<TbAidgoogs> tbAidgoogses) {
		this.aidId = aidId;
		this.tbType = tbType;
		this.aidName = aidName;
		this.aidUnit = aidUnit;
		this.aidScale = aidScale;
		this.aidLocation = aidLocation;
		this.aidLat = aidLat;
		this.aidLng = aidLng;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbAidgoogses = tbAidgoogses;
	}

	// Property accessors
	@Id
	@Column(name = "AID_ID", unique = true, nullable = false, length = 10)
	public String getAidId() {
		return this.aidId;
	}

	public void setAidId(String aidId) {
		this.aidId = aidId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TPYE_ID", nullable = false)
	public TbType getTbType() {
		return this.tbType;
	}

	public void setTbType(TbType tbType) {
		this.tbType = tbType;
	}

	@Column(name = "AID_NAME", nullable = false, length = 200)
	public String getAidName() {
		return this.aidName;
	}

	public void setAidName(String aidName) {
		this.aidName = aidName;
	}

	@Column(name = "AID_UNIT", nullable = false, length = 100)
	public String getAidUnit() {
		return this.aidUnit;
	}

	public void setAidUnit(String aidUnit) {
		this.aidUnit = aidUnit;
	}

	@Column(name = "AID_SCALE", length = 50)
	public String getAidScale() {
		return this.aidScale;
	}

	public void setAidScale(String aidScale) {
		this.aidScale = aidScale;
	}

	@Column(name = "AID_LOCATION", nullable = false, length = 100)
	public String getAidLocation() {
		return this.aidLocation;
	}

	public void setAidLocation(String aidLocation) {
		this.aidLocation = aidLocation;
	}

	@Column(name = "AID_LAT", length = 20)
	public String getAidLat() {
		return this.aidLat;
	}

	public void setAidLat(String aidLat) {
		this.aidLat = aidLat;
	}

	@Column(name = "AID_LNG", length = 20)
	public String getAidLng() {
		return this.aidLng;
	}

	public void setAidLng(String aidLng) {
		this.aidLng = aidLng;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbAidgoodsku")
	public Set<TbAidgoogs> getTbAidgoogses() {
		return this.tbAidgoogses;
	}

	public void setTbAidgoogses(Set<TbAidgoogs> tbAidgoogses) {
		this.tbAidgoogses = tbAidgoogses;
	}

}